Skip to content

IGNITE-27086 Optimize writing Map by BinaryWriterExImpl#12532

Merged
nizhikov merged 18 commits intoapache:masterfrom
nizhikov:IGNITE-27086
Dec 2, 2025
Merged

IGNITE-27086 Optimize writing Map by BinaryWriterExImpl#12532
nizhikov merged 18 commits intoapache:masterfrom
nizhikov:IGNITE-27086

Conversation

@nizhikov
Copy link
Copy Markdown
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

private final BinaryWriterSchemaHolder schema;

/** */
private final boolean failIfUnregistered;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you just move some fields - failIfUnregistered, handles, mapper. Can we revert these changes?

Copy link
Copy Markdown

@ac1d0globlya ac1d0globlya Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I grouped final and non final variables together just to make it more readable.
Yes, we can revert grouping easily, but, looks like having all changing state together more reliable way to list class variables.


/** Clears writer state. */
private void clearState() {
this.typeId = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UNREGISTERED_TYPE_ID?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

);

writer.marshal(obj);
int typeId0 = this.typeId;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIU, the goal of storing this fields is that they are used in #postWrite method that will be called within marshal(obj). I thinks it's worth to mention that in a comment.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 2, 2025

@nizhikov nizhikov merged commit ed18846 into apache:master Dec 2, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants